import axios from "./index";

export function getDictList(currPage, pageSize,info) {
    let params = {currPage: currPage, pageSize: pageSize, ...info};
    return axios.get('/sysDict/list',{ params: params });
}


export function getDictDetail(id) {
    return axios.get(`/sysDict/detail/${id}`);
}


export function deleteDict(id) {
    return axios.delete(`/sysDict/del/${id}`);
}

export function addDict(info) {
    return axios.post('/sysDict/add', info);
}


export function updateDict(info) {
    return axios.post('/sysDict/modify', info);
}





export function getDictItemList(currPage, pageSize,info) {
    let params = {currPage: currPage, pageSize: pageSize, ...info};
    return axios.get('/sysDictItem/list',{ params: params });
}


export function getDictItemDetail(dictId,id) {
    return axios.get(`/sysDictItem/detail/${dictId}/${id}`);
}


export function deleteDictItem(dictId,id) {
    return axios.delete(`/sysDictItem/del/${dictId}/${id}`);
}

export function addDictItem(info) {
    return axios.post('/sysDictItem/add', info);
}


export function updateDictItem(info) {
    return axios.post('/sysDictItem/modify', info);
}
